<!--<?php
if(empty($action)){
print <<<EOT
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/png_IE6.js" type="text/javascript"></script>
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/public.js" type="text/javascript"></script>
<script src="js/common.js" type="text/javascript"></script>
<title>编辑-右侧</title>
<link href="css/zhanzhang_right.css" rel="stylesheet" type="text/css" />
</head>

<body class="zz_right">
<form action="$index_file" method="get" name="form" id="form">
<div class="right_box">
<div class="right_tit">
<dl>
<dt></dt>
<dd>站长个人页面--我的网站管理</dd>
</dl>
</div>

<div class="edit_data">
<dl>

<dd class="dd09"><input id="Checkbox1" name="as" onclick="allchecked()" type="checkbox" />全选</dd>
<dd class="dd08"><strong>网站ID</strong></dd>
<dd class="dd01"><strong>网站名称</strong></dd>
<dd class="dd04"><strong>日访问量</strong></dd>
<dd class="dd02"><strong>网站地址</strong></dd>
<dd class="dd08"><strong>添加日期</strong></dd>
<dd class="dd11"><strong>操作</strong></dd>
<dd class="dd03"><strong>状态</strong></dd>

<!--
EOT;
$curidx = ($curpage-1)*$perpage;
$curpageidx = 0;
$showcount = count($db_affwebsitelist); 
foreach($db_affwebsitelist as $db_affsite){
$status= $cfg_userstatus[$db_affsite[status]];
$cdate = date('Y/m/d H:i:s',$affwebsite[create_time]);
print <<<EOT
-->
<dd class="dd09"><input id="ids" name="ids" type="checkbox" value="$db_affsite[id]" /></dd>
<dd class="dd08">$db_affsite[id]</dd>
<dd class="dd01">$db_affsite[name]</dd>
<dd class="dd04">$db_affsite[day_pv]</dd>
<dd class="dd02"><a href="$db_affsite[url]" target="_blank">$db_affsite[url]</a></dd>
<dd class="dd08">$cdate</dd>
<dd class="dd11"><a target="right" href="$index_file&action=edit&curid=$db_affsite[id]&curpage=$curpage">修改</a></dd>
<dd class="dd03">$status</dd>
<!--
EOT;
}
print <<<EOT
-->
</dl>

<table id="Table1" border="0" cellpadding="0" cellspacing="0" width="98%">
        <tr>
            <td align="right" height="35" valign="middle">
<!--
EOT;
	showPageBreakInfo($showcount);
print <<<EOT
-->
             </td>
        </tr>
    </table>

</div>
<input id="Hidden1" name="allSelect" type="hidden" value="all" />
<input type="hidden" id="count" name="count" value="$showcount" />
<div class="admin_btn">
<dl>
<dd><input name="btnAdd" type="button" value="新增" class="input1" onclick="window.location='$index_file&action=add';"/>
<input name="btnDel" type="button" value="删除" class="input1" onclick="javascript:ConfirmDel('$index_file&action=del&curpage=$curpage','此操作不可恢复,确认删除吗？');"/></dd>
</dl>
</div>
</div>
</form>
</body>
</html>
<!--
EOT;
}else if($action=="add" || $action=="edit"){
$action=="add" && $act_title = "新增";
$action=="edit" && $act_title = "编辑";
$siteurl = "http://";
if(isset($db_affsite) && !empty($db_affsite[url])) 
	$siteurl = $db_affsite[url];
print <<<EOT
-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="js/png_IE6.js" type="text/javascript"></script>
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/public.js" type="text/javascript"></script>
<title>编辑-右侧</title>
<link href="css/code.css" rel="stylesheet" type="text/css" />
<script>
function checkfrm(){
	if(isEmpty($("name").value)){ $("att_name").show();return false;}
	if(isEmpty($("url").value)){ $("att_url").show();return false;}
	if(isEmpty($("sitetype").value)){ $("att_sitetype").show();return false;}
	if(isEmpty($("ip").value)){ $("att_ip").show();return false;}	
	if(isEmpty($("keyword").value)){ $("att_keyword").show();return false;}	
	return true;
}
</script>
</head>

<body class="code">

<form name="form" action="$index_file" method="post" onsubmit="return checkfrm();">
<input type="hidden" name="action" value="save"/>
<input type="hidden" name="curid" value="$curid"/>

<div class="right_box">

<div class="right_tit">
<dl>
<dt></dt>
<dd>站点信息</dd>
</dl>
</div>
<div class="newID">
<dl>
<dt>$act_title 站点信息</dt>
<dd class="dd00"></dd>

<dd class="dd01">站点名称<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text" id="name" name="name" value="$db_affsite[name]" onkeydown="$('att_name').hide();"/></span></dd>
<dd class="dd08"><span id="att_name" style="display:none;color:red">请输入站点名称</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">站点地址<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text"  id="url" name="url"  value="$siteurl" onkeydown="$('att_url').hide();"/></span></dd>
<dd class="dd08"><span id="att_url" style="display:none;color:red">请输入站点名称</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">网站类型<font color=red>*</font></dd>
<dd class="dd07"><span>
						<select ID="sitetype" name="sitetype" style="width:100%"  onchange="$('att_sitetype').hide();">
							<option value="">请选择...</option>
							$op_sortlist
						</select>
			</span></dd>
<dd class="dd08"><span id="att_sitetype" style="display:none;color:red">请选择站点类型</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">IP地址<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text"  id="ip" name="ip" value="$db_affsite[ip]" onkeydown="$('att_ip').hide();"/></span></dd>
<dd class="dd08"><span id="att_ip" style="display:none;color:red">请输入站点名称</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">关键字<font color=red>*</font></dd>
<dd class="dd07"><span><input type="text"  id="keyword" name="keyword"  value="$db_affsite[keyword]" onkeydown="$('att_keyword').hide();"/></span></dd>
<dd class="dd08"><span id="att_keyword" style="display:none;color:red">请输入站点名称</span></dd>
<dd class="dd00"></dd>

<dd class="dd01">标签</dd>
<dd class="dd07"><span><input type="text"  id="tags" name="tags"  value="$db_affsite[tags]"/></span></dd>
<dd class="dd08"></dd>
<dd class="dd00"></dd>

<dd class="dd01">icp证号</dd>
<dd class="dd07"><span><input type="text"  id="icp_code" name="icp_code" value="$db_affsite[icp_code]"/></span></dd>
<dd class="dd08"></dd>
<dd class="dd00"></dd>

<dd class="dd01">日访问量</dd>
<dd class="dd07"><span><input type="text"  id="day_pv" name="day_pv" value="0"  value="$db_affsite[day_pv]"/></span></dd>
<dd class="dd08"></dd>
<dd class="dd00"></dd>

<dd class="dd01">日独立IP</dd>
<dd class="dd07"><span><input type="text"  id="day_ip" name="day_ip" value="0" value="$db_affsite[day_ip]" /></span></dd>
<dd class="dd08"></dd>
<dd class="dd00"></dd>

<dd class="dd01">网站描述</dd>
<dd class="dd06"><textarea ID="memo" name="memo" cols="80" rows="10">$db_affsite[memo]</textarea></dd>
<dd class="dd08"></dd>
<dd class="dd00"></dd>

</dl>
</div>


<div class="editzhan">
<dl>
<dd><input name="submit" type="submit" value="提交" class="input1" /><input name="back" type="button" value="返回" class="input1" onclick="history.go(-1);"/></dd>
</dl>
</div>
</div>

 </form>
</body>
</html>
<!--
EOT;
}
?>-->